
<!-- content for head -->
<% content_for :head do %>
  <%= javascript_include_tag "reply-bundle" %>
  </script>
<% end %>
  <!-- 标签 -->

    <div class="container">
      <span>
        <div class="btn-group">
          <button class="btn dropdown-toggle" data-toggle="dropdown">⃞&nbsp;<span class="caret"></span></button>
          <ul class="dropdown-menu">
            <li><a href="javascript:void(0);" class="select-all-btn">全选</a></li>
            <li><a href="javascript:void(0);" class="select-failed-btn">发送失败的</a></li>
            <li><a href="javascript:void(0);" class="select-suc-btn">发送成功的</a></li>
<!--             <li class="divider"></li>
            <li><a href="javascript:void(0);" class="select-all-btn">点击过的</a></li>
            <li><a href="javascript:void(0);" class="select-all-btn">未点击的</a></li> -->
          </ul>
        </div>
        <div class="btn-group" data-toggle="buttons-checkbox">
          <button type="button" class="btn" id="delete-btn"><i class="icon-trash"></i></button>
          <button type="button" class="btn" id="retweet-btn"><i class="icon-retweet"></i></button>
          <button type="button" class="btn">R</button>
        </div>
        <div class="btn-group">
          <button class="btn dropdown-toggle" data-toggle="dropdown"><i class="icon-wrench"></i>&nbsp;更多操作&nbsp;<span class="caret"></span></button>
          <ul class="dropdown-menu">
            <li><a href="javascript:void(0);" id="clear_unclicked">删除全部未点击微博</a></li>
            <li><a href="javascript:void(0);" id="clear_all">清除本次搜索结果</a></li>
            <li><a href="javascript:void(0);" id="clear_failed">清除所有发送失败的微博</a></li>
            <li><a href="javascript:void(0);" id="retweet_failed">重新发送所有失败的微博</a></li>
          </ul>
        </div>
      </span>
      <span class="pull-right">
        <span>第<%= "#{[((params[:page] || 1).to_i() - 1) * 50, 1].max } - #{[(params[:page] || 1).to_i() * 50, @all_tweets_count].min}" %>项,共<%= @all_tweets_count %>项</span>
        <div class="btn-group" data-toggle="buttons-checkbox">
          <a type="button" class="btn" href="?<%="location=#{params[:location]}&" if params[:location]%>page=<%= [(params[:page] || 1).to_i() - 1, 1].max %>">&lt; </a>
          <a type="button" class="btn <%= 'disabled' if (params[:page] || 1).to_i() > @all_tweets_count / 50  %>" href="?<%="location=#{params[:location]}&" if params[:location]%>page=<%= (params[:page] || 1).to_i() + 1 %>">&gt; </a>
        </div>
        <div class="btn-group">
          <button class="btn dropdown-toggle" data-toggle="dropdown"><i class="icon-filter"></i>&nbsp;<span class="caret"></span></button>
          <ul class="dropdown-menu pull-right">
            <li><a href="?<%="location=#{params[:location]}&" if params[:location]%>time=<%= (Time.now.weeks_ago(1).to_i) %>">七天内</a></li>
            <li><a href="?<%="location=#{params[:location]}&" if params[:location]%>time=<%= (Time.now.months_ago(1).to_i) %>">一月内</a></li>
            <li><a href="?<%="location=#{params[:location]}&" if params[:location]%>time=<%= (Time.now.months_ago(3).to_i) %>">三月内</a></li>
            <li class="divider"></li>
            <li><a href="?">全部</a></li>
          </ul>
        </div>
      </span>
    </div>
  <!-- 微博列表 -->

  <div class="tag-txt-list">
    <ul>

      <%= render :partial => 'admin/replies/replies' %>
    </ul>

    <!-- 弹出窗 -->
    <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 id="myModalLabel">全部评论</h4>
      </div>
      <div class="modal-body" id="comments_list">

      </div>

      <div class="modal-footer">
        <form>
          <input type="hidden" id="commit_tweet_id" name="commit_tweet_id"/>
          <input type="hidden" id="commit_user_id" name="commit_user_id"/>
          <textarea class="span5" rows="2" id="comment_text"></textarea>
          <p class="muted">您当前还能输入 140 个字</p>
          <a class="btn btn-primary" href="javascript:void(0);" id="commit_comment">提交</a>
        </form>

      </div>
    </div>
  </div>
